<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Flask示例</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
    <div class="container">
        <h1>欢迎使用Flask</h1>
        <p>这是一个简单的Flask示例项目</p>
        <div id="api-message"></div>
    </div>
    <script>
        fetch('/api/hello')
            .then(response => response.json())
            .then(data => {
                document.getElementById('api-message').textContent = data.message;
            });
    </script>
</body>
</html>